package com.itcncp.ucenter.dao.model;

import com.alibaba.fastjson.annotation.JSONField;
import com.itcncp.common.plugin.ToStringSerializer;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

public class UserCashinOpJnl implements Serializable {
    /**
     * 提现流水号
     *
     * @mbg.generated
     */
    private String cashinNo;

    /**
     * 客户id
     *
     * @mbg.generated
     */
    @JSONField(serializeUsing= ToStringSerializer.class)
    private Long userId;

    /**
     * 提现金额
     *
     * @mbg.generated
     */
    private BigDecimal cashinAmount;

    /**
     * 提现费用
     *
     * @mbg.generated
     */
    private BigDecimal cashinFee;

    /**
     * 实际提现金额
     *
     * @mbg.generated
     */
    private BigDecimal cashinActAmount;

    /**
     * 提现银行卡
     *
     * @mbg.generated
     */
    private String cashinCardno;

    /**
     * 提现银行卡
     *
     * @mbg.generated
     */
    private String cashinCardName;

    /**
     * 提现时间
     *
     * @mbg.generated
     */
    private Date cashinTime;

    /**
     * 取现前账户余额
     *
     * @mbg.generated
     */
    private BigDecimal oldBalance;

    /**
     * 取现后账户余额
     *
     * @mbg.generated
     */
    private BigDecimal nowBalance;

    /**
     * 提现状态 1:提现失败 2:提现中 3:提现成功
     *
     * @mbg.generated
     */
    private Byte cashinState;

    /**
     * 第三方提现处理id
     */
    private String transferId;

    /**
     * 第三方提现渠道
     1、wx_pub (微信公众号)
     2、wx_lite （微信小程序）
     3、alipay (支付宝)
     4、unionpay （银联电子代付）
     5、allinpay （通联代付）
     6、jdpay （京东代付）
     7、unionpay_gz （贵州银联代付）
     *
     * @mbg.generated
     */
    private Byte channel;

    private String remark;

    private static final long serialVersionUID = 1L;

    public String getCashinNo() {
        return cashinNo;
    }

    public void setCashinNo(String cashinNo) {
        this.cashinNo = cashinNo;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public BigDecimal getCashinAmount() {
        return cashinAmount;
    }

    public void setCashinAmount(BigDecimal cashinAmount) {
        this.cashinAmount = cashinAmount;
    }

    public BigDecimal getCashinFee() {
        return cashinFee;
    }

    public void setCashinFee(BigDecimal cashinFee) {
        this.cashinFee = cashinFee;
    }

    public BigDecimal getCashinActAmount() {
        return cashinActAmount;
    }

    public void setCashinActAmount(BigDecimal cashinActAmount) {
        this.cashinActAmount = cashinActAmount;
    }

    public String getCashinCardno() {
        return cashinCardno;
    }

    public void setCashinCardno(String cashinCardno) {
        this.cashinCardno = cashinCardno;
    }

    public String getCashinCardName() {
        return cashinCardName;
    }

    public void setCashinCardName(String cashinCardName) {
        this.cashinCardName = cashinCardName;
    }

    public Date getCashinTime() {
        return cashinTime;
    }

    public void setCashinTime(Date cashinTime) {
        this.cashinTime = cashinTime;
    }

    public BigDecimal getOldBalance() {
        return oldBalance;
    }

    public void setOldBalance(BigDecimal oldBalance) {
        this.oldBalance = oldBalance;
    }

    public BigDecimal getNowBalance() {
        return nowBalance;
    }

    public void setNowBalance(BigDecimal nowBalance) {
        this.nowBalance = nowBalance;
    }

    public Byte getCashinState() {
        return cashinState;
    }

    public void setCashinState(Byte cashinState) {
        this.cashinState = cashinState;
    }

    public String getTransferId() {
        return transferId;
    }

    public void setTransferId(String transferId) {
        this.transferId = transferId;
    }

    public Byte getChannel() {
        return channel;
    }

    public void setChannel(Byte channel) {
        this.channel = channel;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", cashinNo=").append(cashinNo);
        sb.append(", userId=").append(userId);
        sb.append(", cashinAmount=").append(cashinAmount);
        sb.append(", cashinFee=").append(cashinFee);
        sb.append(", cashinActAmount=").append(cashinActAmount);
        sb.append(", cashinCardno=").append(cashinCardno);
        sb.append(", cashinTime=").append(cashinTime);
        sb.append(", oldBalance=").append(oldBalance);
        sb.append(", nowBalance=").append(nowBalance);
        sb.append(", cashinState=").append(cashinState);
        sb.append(", transferId=").append(transferId);
        sb.append(", channel=").append(channel);
        sb.append(", remark=").append(remark);
        sb.append("]");
        return sb.toString();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        UserCashinOpJnl other = (UserCashinOpJnl) that;
        return (this.getCashinNo() == null ? other.getCashinNo() == null : this.getCashinNo().equals(other.getCashinNo()))
            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getCashinAmount() == null ? other.getCashinAmount() == null : this.getCashinAmount().equals(other.getCashinAmount()))
            && (this.getCashinFee() == null ? other.getCashinFee() == null : this.getCashinFee().equals(other.getCashinFee()))
            && (this.getCashinActAmount() == null ? other.getCashinActAmount() == null : this.getCashinActAmount().equals(other.getCashinActAmount()))
            && (this.getCashinCardno() == null ? other.getCashinCardno() == null : this.getCashinCardno().equals(other.getCashinCardno()))
            && (this.getCashinTime() == null ? other.getCashinTime() == null : this.getCashinTime().equals(other.getCashinTime()))
            && (this.getOldBalance() == null ? other.getOldBalance() == null : this.getOldBalance().equals(other.getOldBalance()))
            && (this.getNowBalance() == null ? other.getNowBalance() == null : this.getNowBalance().equals(other.getNowBalance()))
            && (this.getCashinState() == null ? other.getCashinState() == null : this.getCashinState().equals(other.getCashinState()))
            && (this.getTransferId() == null ? other.getTransferId() == null : this.getTransferId().equals(other.getTransferId()))
            && (this.getChannel() == null ? other.getChannel() == null : this.getChannel().equals(other.getChannel()))
            && (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getCashinNo() == null) ? 0 : getCashinNo().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getCashinAmount() == null) ? 0 : getCashinAmount().hashCode());
        result = prime * result + ((getCashinFee() == null) ? 0 : getCashinFee().hashCode());
        result = prime * result + ((getCashinActAmount() == null) ? 0 : getCashinActAmount().hashCode());
        result = prime * result + ((getCashinCardno() == null) ? 0 : getCashinCardno().hashCode());
        result = prime * result + ((getCashinTime() == null) ? 0 : getCashinTime().hashCode());
        result = prime * result + ((getOldBalance() == null) ? 0 : getOldBalance().hashCode());
        result = prime * result + ((getNowBalance() == null) ? 0 : getNowBalance().hashCode());
        result = prime * result + ((getCashinState() == null) ? 0 : getCashinState().hashCode());
        result = prime * result + ((getTransferId() == null) ? 0 : getTransferId().hashCode());
        result = prime * result + ((getChannel() == null) ? 0 : getChannel().hashCode());
        result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode());
        return result;
    }
}